import {reqOrderList} from '@/api'
const state={
  myOrderList:{}
}

const actions={
async getOrderList(context,{page,limit}){
  console.log(page,limit)
  let result= await reqOrderList(page,limit)
    console.log(result)
      if(result.code==200){
          context.commit('GETORDERLIST',result.data)
      }
 }
}

const mutations={
  GETORDERLIST(state,myOrderList){
    state.myOrderList=myOrderList

  }
}

const getters={
  records(state){
    return state.myOrderList.records
  }
}

export default{
  state,
  actions,
  mutations,
  getters
}